<?php
$sesion = new Sesion();
$usuario=$sesion->getUsuario();

$datos['id'] = "tareasProximas"; //widget2
$datos['titulo'] = "Tareas pr&oacute;ximas";

$calendario = new Calendario($sesion->getUsuario());

$tareas = "";
foreach($calendario->getEventosProximos(7) as $tarea)
{
	if($tarea['dentroDe'] == 0)
		$tareas .= "<tr><td colspan=\"2\">Hoy <b>".$tarea['nota']."</b></td></tr>";
	else
		$tareas .= "<tr><td>".$tarea['nota']."</td><td> dentro de <b>".$tarea['dentroDe']."</b> días</td></tr>";
}

if($tareas == "")
{
$tareas = "<div>No tienes tareas esta semana</div>";
}

	$tareas = "<table>
			".$tareas."
			</table>";
			
$datos['contenido'] = $tareas;

return $datos;

